package vip.ola.pay.channel.chargezfb;

import org.jasypt.encryption.StringEncryptor;
import vip.ola.core.common.util.JasyptUtil;
import vip.ola.core.common.util.PayDigestUtil;

import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.Map;

/**
 * @ClassName Test
 * @Description TODO
 * @Author Administrator
 * @Date 2020/12/15 0015 15:40
 * @Version 1.0
 **/
public class Test {
//    {
//        "supplierId":20,
//            "orderNo":"202012151608017434021",
//            "company":"lt",
//            "amount":"10",
//            "phoneNo":"18651662419",
//            "notifyUrl":"www.baidu.com",
//            "sign":"888f94b4241c526927e2164eff281c99"
//    }
//    http://211.99.100.198:8083/api/provide
    //http://211.99.100.198:8082/api/pay?merchantId=8&payType=alipay&notifyUrl=http://211.99.100.200:8599/api/chargezfb/notify&money=30&orderNo=1607957338385&sign=bce37debb41ba364cdbd9e3d87f51eeb

    public static void main (String args[]) throws IllegalAccessException {

        StringEncryptor stringEncryptor = JasyptUtil.createStringEncryptor();
        String password = stringEncryptor.encrypt("daifu01");
        System.out.println(password);
        //   String password2 = stringEncryptor.decrypt("pb0pqGeBgQwWxYQqOSSMnDfL5WdQ2eJO");
        String password2 = stringEncryptor.decrypt(password);
        System.out.println(password2);
//        Map<String ,String> param = new HashMap<>();
//        param.put("mchId","9000");
//        param.put("mchOrderNo","2023071822202");
//        param.put("accountAttr","0");
//        param.put("amount","200");
//        param.put("accountName","test");
//        param.put("accountNo","1234567");
//        SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
//        String timeStamp = df.format(System.currentTimeMillis());
//        System.out.println(timeStamp);
//        param.put("reqTime",timeStamp);
//        param.put("remark","test");
//        String sign = PayDigestUtil.getSign(param, "NYEQPFILBWTUDXNYRSVJUJWBUWLVUISVHDDBFZJYXRWMXNMW1PYITYIGGXVBJNOMRVRUVOUNN7VZZGBXAFTDVVTWBVWYSBAJPXUAQEBNRZIF8M2IOYHBMMCIJIJ70PGW");
//        System.out.println(sign);
    }
}
